package com.harmony.pilot.data;

import com.harmony.pilot.data.service.CodeQLQueryManager;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * 数据服务启动类
 */
@SpringBootApplication
@RequiredArgsConstructor
public class DataServiceApplication implements CommandLineRunner {
    
    private final CodeQLQueryManager codeQLQueryManager;
    
    public static void main(String[] args) {
        SpringApplication.run(DataServiceApplication.class, args);
        System.out.println("========================================");
        System.out.println("Data Service Started!");
        System.out.println("Port: 8085");
        System.out.println("========================================");
    }
    
    @Override
    public void run(String... args) throws Exception {
        // 初始化CodeQL查询管理器
        codeQLQueryManager.initialize();
        System.out.println("CodeQL Query Manager initialized");
    }
}

